Skip to content

Conversation

alekskjo
Copy link
Member

Summary

  • extend venues with optional server-side search, venue-type filtering, sorting and pagination
  • add venueTypes so the client can build its filter options from database values
  • keep the existing query backward-compatible for the currently deployed frontend
  • document the expanded GraphQL contract

Search is case-insensitive across name, area and type. Multiple venue types are combined with OR. Rating sorting places unrated venues last and uses name and ID as stable tie-breakers. SQL values are parameterized, and literal wildcard characters in searches are escaped.

Verification

  • npm --prefix server run typecheck
  • npm --prefix server run test:data — 60 tests passed
  • npm --prefix server run build
  • git diff --check

Deployment order

This backend change must be reviewed, merged and deployed to the VM before frontend PR #56 is merged. All new arguments are optional, so deploying the backend first remains compatible with the current frontend.

@alekskjo alekskjo requested a review from a team as a code owner October 22, 2026 12:27
@andss andss self-assigned this Oct 22, 2026
andss
andss previously approved these changes Oct 22, 2026
Copy link
Member

@andss andss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the database-side search, filtering, sorting and pagination. The optional arguments preserve compatibility with the current frontend, totalCount covers the complete filtered result, and unrated venues sort last. All 60 backend tests, typecheck and build pass.

Approved for backend merge and deployment, followed by verification on the VM before merging #56.

One follow-up before releasing #56: searching for the Norwegian label “Nattklubb” currently does not match the stored NIGHTCLUB type, so we should support that label and add a regression test.

Copy link
Member

@erikbsa erikbsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Norwegian venue type search issue is fixed, with regression coverage. Both quality checks pass. Approved.

@erikbsa erikbsa merged commit 1ee0e5d into main Oct 23, 2026
2 checks passed
@erikbsa erikbsa deleted the feat/graphql-catalog-query branch October 23, 2026 08:28
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants